@extends('home.layout')
@section('content')

    <div class="ng-scope" ng-view="" role="main">
        <div profile-container="" page-name="order" page-title="近三个月订单" class="profile-container container">
            <div class="clearfix">
                <div location="" class="location" ng-style="{visibility: geohash ? '' : 'hidden'}" role="navigation">
                    <span>当前位置:</span>
                    <ul
                                class="dropbox location-dropbox" ubt-visit="398"><li class="arrow"></li>
                            <!-- ngRepeat: userPlace in userPlaces | filter:filterPlace | limitTo: 4 --><li
                                    class="changelocation"><a href="{{asset('')}}home" ng-href="/home"
                                                              hardjump="">修改收货地址<span
                                            class="icon-location"></span></a></li></ul></span> <span ng-transclude=""><i
                                class="icon-arrow-right ng-scope"></i><span
                                class="ng-binding ng-scope">近三个月订单</span></span>
                </div>
                <div search-input=""></div>
            </div>
            <ul profile-sidebar="" class="profile-sidebar" role="navigation">
                <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"
                                                        ng-class="{ active: pageName === 'profile' }"><i
                                class="icon-line-home"></i><a href="{{asset('')}}profile">个人中心</a></h2></li>
                <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"><i
                                class="icon-line-order"></i>我的订单
                    </h2>
                    <ul>
                        <li class="active" ng-class="{ active: pageName === 'order' }"><a href="#">近三个月订单</a></li>
                        <li ng-class="{ active: pageName === 'order-unrated' }"><a
                                    href="{{asset('')}}profile/order/unrated">待评价订单
                                <!-- ngIf: unratedNumber --></a></li>
                    </ul>
                </li>

                <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"><i
                                class="icon-line-profile"></i>我的资料</h2>
                    <ul>
                        <li ng-class="{ active: pageName === 'info' }"><a
                                    href="{{asset('')}}profile/info">个人资料</a>
                        </li>
                        <li ng-class="{ active: pageName === 'address' }"><a
                                    href="{{asset('')}}profile/address">地址管理</a></li>
                        <li ng-class="{ active: pageName === 'changepassword' }"><a
                                    href="{{asset('')}}profile/security/changepassword">修改密码</a></li>
                    </ul>
                </li>
                <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"
                                                        ng-class="{ active: pageName === 'favor' }"><a
                                href="{{asset('')}}profile/favor"><i class="icon-order-favor"></i>我的收藏</a></h2>
                </li>
            </ul>
            <div class="profile-panel" role="main"><!-- ngIf: pageTitleVisible --><h3 ng-if="pageTitleVisible"
                                                                                      class="profile-paneltitle ng-scope">
                    <span class="ng-binding" ng-bind="pageTitle">近三个月订单</span> <span class="subtitle ng-binding"
                                                                                     ng-bind-html="pageSubtitle | toTrusted"></span>
                </h3><!-- end ngIf: pageTitleVisible -->
                <div class="profile-panelcontent" ng-transclude="">
                    <div class="order-fetchtakeout ng-scope ng-isolate-scope" show-fetch-takeout-dialog=""><img
                                src="{{asset('home/profile/order/images/takeout.f58d1e.png')}}"></div>
                    <div class="order-extra ng-scope"><a href="{{asset('')}}support/question/hotissue"
                                                         target="_blank">热门问题</a></div>
                    <div loading="" ng-show="!orderList" class="loading ng-binding ng-isolate-scope ng-hide">
                        <!-- ngIf: type==='profile' --><img class="ng-scope" ng-if="type==='profile'"
                                                            src="{{asset('home/profile/order/images/profile-loading.4984fa.gif')}}"
                                                            alt="正在加载">
                        <!-- end ngIf: type==='profile' --> <!-- ngIf: type==='normal' -->正在载入数据...
                    </div>
                    @if(false)
                    <div ng-show="orderList &amp;&amp; !orderList.length" nodatatip=""
                         content="暂无记录，现在就去<a href='/place'>订餐</a>吧!" class="order-nocontent nodata ng-isolate-scope"><p
                                class="nodata-container ng-binding" ng-bind-html="content | toTrusted">暂无记录，现在就去<a
                                    href="{{asset('')}}place">订餐</a>吧!</p>
                    </div>
                    @else
                    <table class="order-list ng-scope" ng-show="orderList.length">
                        <thead>
                        <tr>
                            <th>下单时间</th>
                            <th class="order-list-infoth">订单内容</th>
                            <th></th>
                            <th>支付金额（元）</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr></tr><!-- ngRepeat: item in orderList -->
                        {{--@foreach()--}}
                        <tr class="timeline" ng-repeat="item in orderList" order-timeline="">
                            <td class="ordertimeline-time">
                                <p ng-bind="item.created_at | parseDate" class="ordertimeline-title ng-binding">
                                    09-13</p>
                                <p ng-bind="item.created_at | date:'HH:mm'" class="ng-binding">19:31</p>
                                <!-- ngIf: item.realStatus !== 5 --> <!-- ngIf: item.realStatus === 5 -->
                                <i ng-if="item.realStatus === 5"
                                   class="ordertimeline-time-icon icon-uniE65E finish ng-scope"></i>
                                <!-- end ngIf: item.realStatus === 5 -->
                            </td>
                            <td class="ordertimeline-avatar">
                                <a ng-href="/shop/1300459" href="/shop/1300459">
                                    <img
                                            ng-src="//fuss10.elemecdn.com/6/43/2354b2045706b590caf9378fca9eepng.png?imageMogr2/thumbnail/70x70"
                                            src="//fuss10.elemecdn.com/6/43/2354b2045706b590caf9378fca9eepng.png?imageMogr2/thumbnail/70x70">
                                </a>
                            </td>
                            <td class="ordertimeline-info">
                                <h3 class="ordertimeline-title">
                                    <a ng-bind="item.restaurant.name" ng-href="/shop/1300459" class="ng-binding"
                                       href="/shop/1300459">小蜀娘家常菜</a> <!-- ngIf: item.is_book -->
                                </h3>
                                <p class="ordertimeline-info-food">
                                    <a ng-href="order/id/101207418811857654" href="order/id/101207418811857654">
                                        <span ng-bind="item.product" class="ordertimeline-food ng-binding">红烧狮子头-个1份 / 干锅土豆片盖饭1份</span>
                                        <!-- ngIf: item.productnamenum > 2 -->
                                        <span ng-if="item.productnamenum &gt; 2" class="ng-scope">等</span>
                                        <!-- end ngIf: item.productnamenum > 2 -->
                                        <span ng-bind="item.productnum"
                                              class="ordertimeline-info-productnum ng-binding">3</span>
                                        <span>个菜品</span></a></p>
                                <p>订单号:
                                    <a ng-bind="item.unique_id" ng-href="order/id/101207418811857654" class="ng-binding"
                                       href="order/id/101207418811857654">101207418811857654</a>
                                </p>
                            </td>
                            <td class="ordertimeline-amount">
                                <h3 ng-bind="item.total_amount.toFixed(2)"
                                    class="ordertimeline-title ordertimeline-price ui-arial ng-binding">
                                    30.00</h3>
                                <p ng-bind="item.is_online_paid ? '在线支付' : '货到付款'" class="ng-binding">在线支付</p>
                            </td>
                            <td class="ordertimeline-status">
                                <h3
                                        ng-class="{'waitpay': (item.realStatus === 1), 'end': (item.realStatus === 5)}"
                                        ng-bind="item.statusText" class="ng-binding end">订单已完成</h3>
                                <p ng-bind="statusText"
                                   ng-class="{'ordertimeline-status-warning' : item.realStatus !== 1}"
                                   class="ordertimeline-status-time ng-binding ordertimeline-status-warning"></p>
                            </td>
                            <td class="ordertimeline-handle">
                                {{--<a ng-href="order/id/101207418811857654"--}}
                                   {{--class="ordertimeline-handle-detail"--}}
                                   {{--href="order/id/101207418811857654">订单详情</a>--}}
                                <!-- ngIf: item.realStatus === 1 --> <!-- ngIf: item.realStatus === 2 -->
                                <!-- ngIf: item.realStatus === 3 --> <!-- ngIf: item.realStatus === 4 -->
                                <!-- ngIf: item.realStatus === 5 -->
                                <a ng-click="bundle.restore(item)"
                                   href="javascript:"
                                   class="ordertimeline-handle-a ng-scope"
                                   ng-if="item.realStatus === 5">再来一份</a>
                                <!-- end ngIf: item.realStatus === 5 --> <!-- ngIf: item.realStatus === 6 -->
                            </td>
                        </tr>
                        {{--@endforeachch--}}
                        </tbody>
                    </table>
                    @endif
                    <div class="ng-scope pagination" pagination="order" pagination-context="pageContext"
                         pagination-onchange="onOrderPageChange()">
                        <ul></ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection